import request from ".";
interface ApiResponse<T = unknown> {
    code: number,
    data: T,
    message: string
}

export const uploadApi = <T>(data: unknown) => {
    return request.post('/file/upload', data, {
        headers: {
            'content-type': 'multipart/form-data'
        }

    }) as Promise<ApiResponse<T>>
}